//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension TaxSettings {
    // MARK: Enums

    public enum AddressRoleType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case billingAddress = "BillingAddress"
        case contactAddress = "ContactAddress"
        case taxAddress = "TaxAddress"
        public var description: String { return self.rawValue }
    }

    public enum EntityExemptionAccountStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case expired = "Expired"
        case none = "None"
        case pending = "Pending"
        case valid = "Valid"
        public var description: String { return self.rawValue }
    }

    public enum HeritageStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case optIn = "OptIn"
        case optOut = "OptOut"
        public var description: String { return self.rawValue }
    }

    public enum IndonesiaTaxRegistrationNumberType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case nik = "NIK"
        case nitku = "NITKU"
        case npwp = "NPWP"
        case passportNumber = "PassportNumber"
        public var description: String { return self.rawValue }
    }

    public enum Industries: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case banks = "Banks"
        case circulatingOrg = "CirculatingOrg"
        case developmentAgencies = "DevelopmentAgencies"
        case insurance = "Insurance"
        case pensionAndBenefitFunds = "PensionAndBenefitFunds"
        case professionalOrg = "ProfessionalOrg"
        public var description: String { return self.rawValue }
    }

    public enum IsraelCustomerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case business = "Business"
        case individual = "Individual"
        public var description: String { return self.rawValue }
    }

    public enum IsraelDealerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case authorized = "Authorized"
        case nonAuthorized = "Non-authorized"
        public var description: String { return self.rawValue }
    }

    public enum MalaysiaServiceTaxCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case consultancy = "Consultancy"
        case digitalSvcElectronicMedium = "Digital Service And Electronic Medium"
        case itServices = "IT Services"
        case trainingOrCoaching = "Training Or Coaching"
        public var description: String { return self.rawValue }
    }

    public enum PersonType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case business = "Business"
        case legalPerson = "Legal Person"
        case physicalPerson = "Physical Person"
        public var description: String { return self.rawValue }
    }

    public enum RegistrationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case intraEu = "Intra-EU"
        case local = "Local"
        public var description: String { return self.rawValue }
    }

    public enum SaudiArabiaTaxRegistrationNumberType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case commercialRegistrationNumber = "CommercialRegistrationNumber"
        case taxIdentificationNumber = "TaxIdentificationNumber"
        case taxRegistrationNumber = "TaxRegistrationNumber"
        public var description: String { return self.rawValue }
    }

    public enum Sector: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case business = "Business"
        case individual = "Individual"
        case publicInstitutions = "Government"
        public var description: String { return self.rawValue }
    }

    public enum SupplementalTaxRegistrationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case vat = "VAT"
        public var description: String { return self.rawValue }
    }

    public enum TaxRegistrationNumberType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case localRegistrationNumber = "LocalRegistrationNumber"
        case taxRegistrationNumber = "TaxRegistrationNumber"
        public var description: String { return self.rawValue }
    }

    public enum TaxRegistrationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deleted = "Deleted"
        case pending = "Pending"
        case rejected = "Rejected"
        case verified = "Verified"
        public var description: String { return self.rawValue }
    }

    public enum TaxRegistrationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cnpj = "CNPJ"
        case cpf = "CPF"
        case gst = "GST"
        case nric = "NRIC"
        case sst = "SST"
        case tin = "TIN"
        case vat = "VAT"
        public var description: String { return self.rawValue }
    }

    public enum UkraineTrnType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case business = "Business"
        case individual = "Individual"
        public var description: String { return self.rawValue }
    }

    public enum UzbekistanTaxRegistrationNumberType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case business = "Business"
        case individual = "Individual"
        public var description: String { return self.rawValue }
    }

    public enum ValidationExceptionErrorCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case expiredToken = "ExpiredToken"
        case fieldValidationFailed = "FieldValidationFailed"
        case invalidToken = "InvalidToken"
        case malformedToken = "MalformedToken"
        case missingInput = "MissingInput"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccountDetails: AWSDecodableShape {
        /// List of unique account identifiers.
        public let accountId: String?
        ///  The meta data information associated with the account.
        public let accountMetaData: AccountMetaData?
        ///  Tax inheritance information associated with the account.
        public let taxInheritanceDetails: TaxInheritanceDetails?
        /// Your TRN information. Instead of having full legal address, here TRN information will have jurisdiction details (for example, country code and state/region/province if applicable).
        public let taxRegistration: TaxRegistrationWithJurisdiction?

        @inlinable
        public init(accountId: String? = nil, accountMetaData: AccountMetaData? = nil, taxInheritanceDetails: TaxInheritanceDetails? = nil, taxRegistration: TaxRegistrationWithJurisdiction? = nil) {
            self.accountId = accountId
            self.accountMetaData = accountMetaData
            self.taxInheritanceDetails = taxInheritanceDetails
            self.taxRegistration = taxRegistration
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
            case accountMetaData = "accountMetaData"
            case taxInheritanceDetails = "taxInheritanceDetails"
            case taxRegistration = "taxRegistration"
        }
    }

    public struct AccountMetaData: AWSDecodableShape {
        ///  The Amazon Web Services accounts name.
        public let accountName: String?
        public let address: Address?
        ///  Address roles associated with the account containing country code information.
        public let addressRoleMap: [AddressRoleType: Jurisdiction]?
        ///  The type of address associated with the legal profile.
        public let addressType: AddressRoleType?
        ///  Seller information associated with the account.
        public let seller: String?

        @inlinable
        public init(accountName: String? = nil, address: Address? = nil, addressRoleMap: [AddressRoleType: Jurisdiction]? = nil, addressType: AddressRoleType? = nil, seller: String? = nil) {
            self.accountName = accountName
            self.address = address
            self.addressRoleMap = addressRoleMap
            self.addressType = addressType
            self.seller = seller
        }

        private enum CodingKeys: String, CodingKey {
            case accountName = "accountName"
            case address = "address"
            case addressRoleMap = "addressRoleMap"
            case addressType = "addressType"
            case seller = "seller"
        }
    }

    public struct AdditionalInfoRequest: AWSEncodableShape {
        ///  Additional tax information associated with your TRN in Canada.
        public let canadaAdditionalInfo: CanadaAdditionalInfo?
        /// Additional tax information to specify for a TRN in Egypt.
        public let egyptAdditionalInfo: EgyptAdditionalInfo?
        ///  Additional tax information to specify for a TRN in Estonia.
        public let estoniaAdditionalInfo: EstoniaAdditionalInfo?
        ///  Additional tax information to specify for a TRN in Georgia.
        public let georgiaAdditionalInfo: GeorgiaAdditionalInfo?
        /// Additional tax information to specify for a TRN in Greece.
        public let greeceAdditionalInfo: GreeceAdditionalInfo?
        ///
        public let indonesiaAdditionalInfo: IndonesiaAdditionalInfo?
        ///  Additional tax information to specify for a TRN in Israel.
        public let israelAdditionalInfo: IsraelAdditionalInfo?
        ///  Additional tax information to specify for a TRN in Italy.
        public let italyAdditionalInfo: ItalyAdditionalInfo?
        /// Additional tax information to specify for a TRN in Kenya.
        public let kenyaAdditionalInfo: KenyaAdditionalInfo?
        ///  Additional tax information to specify for a TRN in Malaysia.
        public let malaysiaAdditionalInfo: MalaysiaAdditionalInfo?
        ///  Additional tax information associated with your TRN in Poland.
        public let polandAdditionalInfo: PolandAdditionalInfo?
        /// Additional tax information to specify for a TRN in Romania.
        public let romaniaAdditionalInfo: RomaniaAdditionalInfo?
        ///  Additional tax information associated with your TRN in Saudi Arabia.
        public let saudiArabiaAdditionalInfo: SaudiArabiaAdditionalInfo?
        /// Additional tax information to specify for a TRN in South Korea.
        public let southKoreaAdditionalInfo: SouthKoreaAdditionalInfo?
        /// Additional tax information to specify for a TRN in Spain.
        public let spainAdditionalInfo: SpainAdditionalInfo?
        /// Additional tax information to specify for a TRN in Turkey.
        public let turkeyAdditionalInfo: TurkeyAdditionalInfo?
        ///  Additional tax information associated with your TRN in Ukraine.
        public let ukraineAdditionalInfo: UkraineAdditionalInfo?
        ///  Additional tax information to specify for a TRN in Uzbekistan.
        public let uzbekistanAdditionalInfo: UzbekistanAdditionalInfo?
        /// Additional tax information to specify for a TRN in Vietnam.
        public let vietnamAdditionalInfo: VietnamAdditionalInfo?

        @inlinable
        public init(canadaAdditionalInfo: CanadaAdditionalInfo? = nil, egyptAdditionalInfo: EgyptAdditionalInfo? = nil, estoniaAdditionalInfo: EstoniaAdditionalInfo? = nil, georgiaAdditionalInfo: GeorgiaAdditionalInfo? = nil, greeceAdditionalInfo: GreeceAdditionalInfo? = nil, indonesiaAdditionalInfo: IndonesiaAdditionalInfo? = nil, israelAdditionalInfo: IsraelAdditionalInfo? = nil, italyAdditionalInfo: ItalyAdditionalInfo? = nil, kenyaAdditionalInfo: KenyaAdditionalInfo? = nil, malaysiaAdditionalInfo: MalaysiaAdditionalInfo? = nil, polandAdditionalInfo: PolandAdditionalInfo? = nil, romaniaAdditionalInfo: RomaniaAdditionalInfo? = nil, saudiArabiaAdditionalInfo: SaudiArabiaAdditionalInfo? = nil, southKoreaAdditionalInfo: SouthKoreaAdditionalInfo? = nil, spainAdditionalInfo: SpainAdditionalInfo? = nil, turkeyAdditionalInfo: TurkeyAdditionalInfo? = nil, ukraineAdditionalInfo: UkraineAdditionalInfo? = nil, uzbekistanAdditionalInfo: UzbekistanAdditionalInfo? = nil, vietnamAdditionalInfo: VietnamAdditionalInfo? = nil) {
            self.canadaAdditionalInfo = canadaAdditionalInfo
            self.egyptAdditionalInfo = egyptAdditionalInfo
            self.estoniaAdditionalInfo = estoniaAdditionalInfo
            self.georgiaAdditionalInfo = georgiaAdditionalInfo
            self.greeceAdditionalInfo = greeceAdditionalInfo
            self.indonesiaAdditionalInfo = indonesiaAdditionalInfo
            self.israelAdditionalInfo = israelAdditionalInfo
            self.italyAdditionalInfo = italyAdditionalInfo
            self.kenyaAdditionalInfo = kenyaAdditionalInfo
            self.malaysiaAdditionalInfo = malaysiaAdditionalInfo
            self.polandAdditionalInfo = polandAdditionalInfo
            self.romaniaAdditionalInfo = romaniaAdditionalInfo
            self.saudiArabiaAdditionalInfo = saudiArabiaAdditionalInfo
            self.southKoreaAdditionalInfo = southKoreaAdditionalInfo
            self.spainAdditionalInfo = spainAdditionalInfo
            self.turkeyAdditionalInfo = turkeyAdditionalInfo
            self.ukraineAdditionalInfo = ukraineAdditionalInfo
            self.uzbekistanAdditionalInfo = uzbekistanAdditionalInfo
            self.vietnamAdditionalInfo = vietnamAdditionalInfo
        }

        public func validate(name: String) throws {
            try self.canadaAdditionalInfo?.validate(name: "\(name).canadaAdditionalInfo")
            try self.egyptAdditionalInfo?.validate(name: "\(name).egyptAdditionalInfo")
            try self.estoniaAdditionalInfo?.validate(name: "\(name).estoniaAdditionalInfo")
            try self.greeceAdditionalInfo?.validate(name: "\(name).greeceAdditionalInfo")
            try self.indonesiaAdditionalInfo?.validate(name: "\(name).indonesiaAdditionalInfo")
            try self.italyAdditionalInfo?.validate(name: "\(name).italyAdditionalInfo")
            try self.malaysiaAdditionalInfo?.validate(name: "\(name).malaysiaAdditionalInfo")
            try self.polandAdditionalInfo?.validate(name: "\(name).polandAdditionalInfo")
            try self.southKoreaAdditionalInfo?.validate(name: "\(name).southKoreaAdditionalInfo")
            try self.turkeyAdditionalInfo?.validate(name: "\(name).turkeyAdditionalInfo")
            try self.uzbekistanAdditionalInfo?.validate(name: "\(name).uzbekistanAdditionalInfo")
            try self.vietnamAdditionalInfo?.validate(name: "\(name).vietnamAdditionalInfo")
        }

        private enum CodingKeys: String, CodingKey {
            case canadaAdditionalInfo = "canadaAdditionalInfo"
            case egyptAdditionalInfo = "egyptAdditionalInfo"
            case estoniaAdditionalInfo = "estoniaAdditionalInfo"
            case georgiaAdditionalInfo = "georgiaAdditionalInfo"
            case greeceAdditionalInfo = "greeceAdditionalInfo"
            case indonesiaAdditionalInfo = "indonesiaAdditionalInfo"
            case israelAdditionalInfo = "israelAdditionalInfo"
            case italyAdditionalInfo = "italyAdditionalInfo"
            case kenyaAdditionalInfo = "kenyaAdditionalInfo"
            case malaysiaAdditionalInfo = "malaysiaAdditionalInfo"
            case polandAdditionalInfo = "polandAdditionalInfo"
            case romaniaAdditionalInfo = "romaniaAdditionalInfo"
            case saudiArabiaAdditionalInfo = "saudiArabiaAdditionalInfo"
            case southKoreaAdditionalInfo = "southKoreaAdditionalInfo"
            case spainAdditionalInfo = "spainAdditionalInfo"
            case turkeyAdditionalInfo = "turkeyAdditionalInfo"
            case ukraineAdditionalInfo = "ukraineAdditionalInfo"
            case uzbekistanAdditionalInfo = "uzbekistanAdditionalInfo"
            case vietnamAdditionalInfo = "vietnamAdditionalInfo"
        }
    }

    public struct AdditionalInfoResponse: AWSDecodableShape {
        /// Additional tax information associated with your TRN in Brazil. The Tax Settings API returns this information in your response when any additional information is present with your TRN in Brazil.
        public let brazilAdditionalInfo: BrazilAdditionalInfo?
        /// Additional tax information associated with your TRN in Canada.
        public let canadaAdditionalInfo: CanadaAdditionalInfo?
        /// Additional tax information to specify for a TRN in Egypt.
        public let egyptAdditionalInfo: EgyptAdditionalInfo?
        ///  Additional tax information associated with your  TRN in Estonia.
        public let estoniaAdditionalInfo: EstoniaAdditionalInfo?
        ///  Additional tax information associated with your TRN in Georgia.
        public let georgiaAdditionalInfo: GeorgiaAdditionalInfo?
        /// Additional tax information to specify for a TRN in Greece.
        public let greeceAdditionalInfo: GreeceAdditionalInfo?
        ///  Additional tax information in India.
        public let indiaAdditionalInfo: IndiaAdditionalInfo?
        /// Additional tax information associated with your TRN in Indonesia.
        public let indonesiaAdditionalInfo: IndonesiaAdditionalInfo?
        ///  Additional tax information associated with your TRN in Israel.
        public let israelAdditionalInfo: IsraelAdditionalInfo?
        ///  Additional tax information associated with your TRN in Italy.
        public let italyAdditionalInfo: ItalyAdditionalInfo?
        /// Additional tax information associated with your TRN in Kenya.
        public let kenyaAdditionalInfo: KenyaAdditionalInfo?
        ///  Additional tax information associated with your  TRN in Malaysia.
        public let malaysiaAdditionalInfo: MalaysiaAdditionalInfo?
        ///  Additional tax information associated with your TRN in Poland.
        public let polandAdditionalInfo: PolandAdditionalInfo?
        /// Additional tax information to specify for a TRN in Romania.
        public let romaniaAdditionalInfo: RomaniaAdditionalInfo?
        ///  Additional tax information associated with your TRN in Saudi Arabia.
        public let saudiArabiaAdditionalInfo: SaudiArabiaAdditionalInfo?
        /// Additional tax information associated with your TRN in South Korea.
        public let southKoreaAdditionalInfo: SouthKoreaAdditionalInfo?
        /// Additional tax information associated with your TRN in Spain.
        public let spainAdditionalInfo: SpainAdditionalInfo?
        /// Additional tax information associated with your TRN in Turkey.
        public let turkeyAdditionalInfo: TurkeyAdditionalInfo?
        ///  Additional tax information associated with your TRN in Ukraine.
        public let ukraineAdditionalInfo: UkraineAdditionalInfo?
        ///  Additional tax information associated with your TRN in Uzbekistan.
        public let uzbekistanAdditionalInfo: UzbekistanAdditionalInfo?
        /// Additional tax information to specify for a TRN in Vietnam.
        public let vietnamAdditionalInfo: VietnamAdditionalInfo?

        @inlinable
        public init(brazilAdditionalInfo: BrazilAdditionalInfo? = nil, canadaAdditionalInfo: CanadaAdditionalInfo? = nil, egyptAdditionalInfo: EgyptAdditionalInfo? = nil, estoniaAdditionalInfo: EstoniaAdditionalInfo? = nil, georgiaAdditionalInfo: GeorgiaAdditionalInfo? = nil, greeceAdditionalInfo: GreeceAdditionalInfo? = nil, indiaAdditionalInfo: IndiaAdditionalInfo? = nil, indonesiaAdditionalInfo: IndonesiaAdditionalInfo? = nil, israelAdditionalInfo: IsraelAdditionalInfo? = nil, italyAdditionalInfo: ItalyAdditionalInfo? = nil, kenyaAdditionalInfo: KenyaAdditionalInfo? = nil, malaysiaAdditionalInfo: MalaysiaAdditionalInfo? = nil, polandAdditionalInfo: PolandAdditionalInfo? = nil, romaniaAdditionalInfo: RomaniaAdditionalInfo? = nil, saudiArabiaAdditionalInfo: SaudiArabiaAdditionalInfo? = nil, southKoreaAdditionalInfo: SouthKoreaAdditionalInfo? = nil, spainAdditionalInfo: SpainAdditionalInfo? = nil, turkeyAdditionalInfo: TurkeyAdditionalInfo? = nil, ukraineAdditionalInfo: UkraineAdditionalInfo? = nil, uzbekistanAdditionalInfo: UzbekistanAdditionalInfo? = nil, vietnamAdditionalInfo: VietnamAdditionalInfo? = nil) {
            self.brazilAdditionalInfo = brazilAdditionalInfo
            self.canadaAdditionalInfo = canadaAdditionalInfo
            self.egyptAdditionalInfo = egyptAdditionalInfo
            self.estoniaAdditionalInfo = estoniaAdditionalInfo
            self.georgiaAdditionalInfo = georgiaAdditionalInfo
            self.greeceAdditionalInfo = greeceAdditionalInfo
            self.indiaAdditionalInfo = indiaAdditionalInfo
            self.indonesiaAdditionalInfo = indonesiaAdditionalInfo
            self.israelAdditionalInfo = israelAdditionalInfo
            self.italyAdditionalInfo = italyAdditionalInfo
            self.kenyaAdditionalInfo = kenyaAdditionalInfo
            self.malaysiaAdditionalInfo = malaysiaAdditionalInfo
            self.polandAdditionalInfo = polandAdditionalInfo
            self.romaniaAdditionalInfo = romaniaAdditionalInfo
            self.saudiArabiaAdditionalInfo = saudiArabiaAdditionalInfo
            self.southKoreaAdditionalInfo = southKoreaAdditionalInfo
            self.spainAdditionalInfo = spainAdditionalInfo
            self.turkeyAdditionalInfo = turkeyAdditionalInfo
            self.ukraineAdditionalInfo = ukraineAdditionalInfo
            self.uzbekistanAdditionalInfo = uzbekistanAdditionalInfo
            self.vietnamAdditionalInfo = vietnamAdditionalInfo
        }

        private enum CodingKeys: String, CodingKey {
            case brazilAdditionalInfo = "brazilAdditionalInfo"
            case canadaAdditionalInfo = "canadaAdditionalInfo"
            case egyptAdditionalInfo = "egyptAdditionalInfo"
            case estoniaAdditionalInfo = "estoniaAdditionalInfo"
            case georgiaAdditionalInfo = "georgiaAdditionalInfo"
            case greeceAdditionalInfo = "greeceAdditionalInfo"
            case indiaAdditionalInfo = "indiaAdditionalInfo"
            case indonesiaAdditionalInfo = "indonesiaAdditionalInfo"
            case israelAdditionalInfo = "israelAdditionalInfo"
            case italyAdditionalInfo = "italyAdditionalInfo"
            case kenyaAdditionalInfo = "kenyaAdditionalInfo"
            case malaysiaAdditionalInfo = "malaysiaAdditionalInfo"
            case polandAdditionalInfo = "polandAdditionalInfo"
            case romaniaAdditionalInfo = "romaniaAdditionalInfo"
            case saudiArabiaAdditionalInfo = "saudiArabiaAdditionalInfo"
            case southKoreaAdditionalInfo = "southKoreaAdditionalInfo"
            case spainAdditionalInfo = "spainAdditionalInfo"
            case turkeyAdditionalInfo = "turkeyAdditionalInfo"
            case ukraineAdditionalInfo = "ukraineAdditionalInfo"
            case uzbekistanAdditionalInfo = "uzbekistanAdditionalInfo"
            case vietnamAdditionalInfo = "vietnamAdditionalInfo"
        }
    }

    public struct Address: AWSEncodableShape & AWSDecodableShape {
        /// The first line of the address.
        public let addressLine1: String
        /// The second line of the address, if applicable.
        public let addressLine2: String?
        ///  The third line of the address, if applicable. Currently, the Tax Settings API accepts the addressLine3 parameter only for Saudi Arabia. When you specify a TRN in Saudi Arabia, you must enter the addressLine3 and specify the building number for the address. For example, you might enter 1234.
        public let addressLine3: String?
        /// The city that the address is in.
        public let city: String
        /// The country code for the country that the address is in.
        public let countryCode: String
        /// The district or county the address is located.   For addresses in Brazil, this parameter uses the name of the neighborhood. When you set a TRN in Brazil, use districtOrCounty for the neighborhood name.
        public let districtOrCounty: String?
        ///  The postal code associated with the address.
        public let postalCode: String
        /// The state, region, or province that the address is located. This field is only required for Canada, India, United Arab Emirates, Romania, and Brazil (CPF). It is optional for all other countries. If this is required for tax settings, use the same name as shown on the Tax Settings page.
        public let stateOrRegion: String?

        @inlinable
        public init(addressLine1: String, addressLine2: String? = nil, addressLine3: String? = nil, city: String, countryCode: String, districtOrCounty: String? = nil, postalCode: String, stateOrRegion: String? = nil) {
            self.addressLine1 = addressLine1
            self.addressLine2 = addressLine2
            self.addressLine3 = addressLine3
            self.city = city
            self.countryCode = countryCode
            self.districtOrCounty = districtOrCounty
            self.postalCode = postalCode
            self.stateOrRegion = stateOrRegion
        }

        public func validate(name: String) throws {
            try self.validate(self.addressLine1, name: "addressLine1", parent: name, max: 180)
            try self.validate(self.addressLine1, name: "addressLine1", parent: name, min: 1)
            try self.validate(self.addressLine1, name: "addressLine1", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.addressLine2, name: "addressLine2", parent: name, max: 60)
            try self.validate(self.addressLine2, name: "addressLine2", parent: name, min: 1)
            try self.validate(self.addressLine2, name: "addressLine2", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.addressLine3, name: "addressLine3", parent: name, max: 60)
            try self.validate(self.addressLine3, name: "addressLine3", parent: name, min: 1)
            try self.validate(self.addressLine3, name: "addressLine3", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.city, name: "city", parent: name, max: 50)
            try self.validate(self.city, name: "city", parent: name, min: 1)
            try self.validate(self.city, name: "city", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.countryCode, name: "countryCode", parent: name, max: 2)
            try self.validate(self.countryCode, name: "countryCode", parent: name, min: 2)
            try self.validate(self.countryCode, name: "countryCode", parent: name, pattern: "^[a-zA-Z]+$")
            try self.validate(self.districtOrCounty, name: "districtOrCounty", parent: name, max: 50)
            try self.validate(self.districtOrCounty, name: "districtOrCounty", parent: name, min: 1)
            try self.validate(self.districtOrCounty, name: "districtOrCounty", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.postalCode, name: "postalCode", parent: name, max: 20)
            try self.validate(self.postalCode, name: "postalCode", parent: name, min: 1)
            try self.validate(self.postalCode, name: "postalCode", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.stateOrRegion, name: "stateOrRegion", parent: name, max: 50)
            try self.validate(self.stateOrRegion, name: "stateOrRegion", parent: name, min: 1)
            try self.validate(self.stateOrRegion, name: "stateOrRegion", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case addressLine1 = "addressLine1"
            case addressLine2 = "addressLine2"
            case addressLine3 = "addressLine3"
            case city = "city"
            case countryCode = "countryCode"
            case districtOrCounty = "districtOrCounty"
            case postalCode = "postalCode"
            case stateOrRegion = "stateOrRegion"
        }
    }

    public struct Authority: AWSEncodableShape & AWSDecodableShape {
        ///  The country code for the country that the address is in.
        public let country: String
        ///  The state that the address is located.
        public let state: String?

        @inlinable
        public init(country: String, state: String? = nil) {
            self.country = country
            self.state = state
        }

        public func validate(name: String) throws {
            try self.validate(self.country, name: "country", parent: name, max: 2)
            try self.validate(self.country, name: "country", parent: name, min: 2)
            try self.validate(self.country, name: "country", parent: name, pattern: "^[a-zA-Z]+$")
            try self.validate(self.state, name: "state", parent: name, max: 50)
            try self.validate(self.state, name: "state", parent: name, min: 1)
            try self.validate(self.state, name: "state", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case country = "country"
            case state = "state"
        }
    }

    public struct BatchDeleteTaxRegistrationError: AWSDecodableShape {
        ///  The unique account identifier for the account whose tax registration couldn't be deleted during the BatchDeleteTaxRegistration operation.
        public let accountId: String
        ///  The error code for an individual failure in BatchDeleteTaxRegistration operation.
        public let code: String?
        ///  The error message for an individual failure in the BatchDeleteTaxRegistration operation.
        public let message: String

        @inlinable
        public init(accountId: String, code: String? = nil, message: String) {
            self.accountId = accountId
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
            case code = "code"
            case message = "message"
        }
    }

    public struct BatchDeleteTaxRegistrationRequest: AWSEncodableShape {
        /// List of unique account identifiers.
        public let accountIds: [String]

        @inlinable
        public init(accountIds: [String]) {
            self.accountIds = accountIds
        }

        public func validate(name: String) throws {
            try self.accountIds.forEach {
                try validate($0, name: "accountIds[]", parent: name, max: 12)
                try validate($0, name: "accountIds[]", parent: name, min: 12)
                try validate($0, name: "accountIds[]", parent: name, pattern: "^\\d+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accountIds = "accountIds"
        }
    }

    public struct BatchDeleteTaxRegistrationResponse: AWSDecodableShape {
        /// The list of errors for the accounts the TRN information could not be deleted for.
        public let errors: [BatchDeleteTaxRegistrationError]

        @inlinable
        public init(errors: [BatchDeleteTaxRegistrationError]) {
            self.errors = errors
        }

        private enum CodingKeys: String, CodingKey {
            case errors = "errors"
        }
    }

    public struct BatchGetTaxExemptionsRequest: AWSEncodableShape {
        ///  List of unique account identifiers.
        public let accountIds: [String]

        @inlinable
        public init(accountIds: [String]) {
            self.accountIds = accountIds
        }

        public func validate(name: String) throws {
            try self.accountIds.forEach {
                try validate($0, name: "accountIds[]", parent: name, max: 12)
                try validate($0, name: "accountIds[]", parent: name, min: 12)
                try validate($0, name: "accountIds[]", parent: name, pattern: "^\\d+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accountIds = "accountIds"
        }
    }

    public struct BatchGetTaxExemptionsResponse: AWSDecodableShape {
        /// The list of accounts that failed to get tax exemptions.
        public let failedAccounts: [String]?
        /// The tax exemption details map of accountId and tax exemption details.
        public let taxExemptionDetailsMap: [String: TaxExemptionDetails]?

        @inlinable
        public init(failedAccounts: [String]? = nil, taxExemptionDetailsMap: [String: TaxExemptionDetails]? = nil) {
            self.failedAccounts = failedAccounts
            self.taxExemptionDetailsMap = taxExemptionDetailsMap
        }

        private enum CodingKeys: String, CodingKey {
            case failedAccounts = "failedAccounts"
            case taxExemptionDetailsMap = "taxExemptionDetailsMap"
        }
    }

    public struct BatchPutTaxRegistrationError: AWSDecodableShape {
        ///  The unique account identifier for the account that the tax registration couldn't be added, or updated during the BatchPutTaxRegistration operation.
        public let accountId: String
        ///  The error code for an individual failure in the BatchPutTaxRegistration operation.
        public let code: String?
        ///  The error message for an individual failure in the BatchPutTaxRegistration operation.
        public let message: String

        @inlinable
        public init(accountId: String, code: String? = nil, message: String) {
            self.accountId = accountId
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
            case code = "code"
            case message = "message"
        }
    }

    public struct BatchPutTaxRegistrationRequest: AWSEncodableShape {
        ///  List of unique account identifiers.
        public let accountIds: [String]
        /// Your TRN information that will be stored to the accounts mentioned in putEntries.
        public let taxRegistrationEntry: TaxRegistrationEntry

        @inlinable
        public init(accountIds: [String], taxRegistrationEntry: TaxRegistrationEntry) {
            self.accountIds = accountIds
            self.taxRegistrationEntry = taxRegistrationEntry
        }

        public func validate(name: String) throws {
            try self.accountIds.forEach {
                try validate($0, name: "accountIds[]", parent: name, max: 12)
                try validate($0, name: "accountIds[]", parent: name, min: 12)
                try validate($0, name: "accountIds[]", parent: name, pattern: "^\\d+$")
            }
            try self.taxRegistrationEntry.validate(name: "\(name).taxRegistrationEntry")
        }

        private enum CodingKeys: String, CodingKey {
            case accountIds = "accountIds"
            case taxRegistrationEntry = "taxRegistrationEntry"
        }
    }

    public struct BatchPutTaxRegistrationResponse: AWSDecodableShape {
        /// List of errors for the accounts the TRN information could not be added or updated to.
        public let errors: [BatchPutTaxRegistrationError]
        /// The status of your TRN stored in the system after processing. Based on the validation occurring on the TRN, the status can be Verified, Pending or Rejected.
        public let status: TaxRegistrationStatus?

        @inlinable
        public init(errors: [BatchPutTaxRegistrationError], status: TaxRegistrationStatus? = nil) {
            self.errors = errors
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case errors = "errors"
            case status = "status"
        }
    }

    public struct BrazilAdditionalInfo: AWSDecodableShape {
        /// The Cadastro de Contribuintes Mobiliários (CCM) code for your TRN in Brazil. This only applies for a CNPJ tax type for the São Paulo municipality.
        public let ccmCode: String?
        /// Legal nature of business, based on your TRN in Brazil. This only applies for a CNPJ tax type.
        public let legalNatureCode: String?

        @inlinable
        public init(ccmCode: String? = nil, legalNatureCode: String? = nil) {
            self.ccmCode = ccmCode
            self.legalNatureCode = legalNatureCode
        }

        private enum CodingKeys: String, CodingKey {
            case ccmCode = "ccmCode"
            case legalNatureCode = "legalNatureCode"
        }
    }

    public struct CanadaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The Quebec Sales Tax ID number. Leave blank if you do not have a Quebec Sales Tax ID number.
        public let canadaQuebecSalesTaxNumber: String?
        ///  Manitoba Retail Sales Tax ID number. Customers purchasing Amazon Web Services services for resale in Manitoba must provide a valid Retail Sales Tax ID number for Manitoba. Leave this blank if you do not have a Retail Sales Tax ID number in Manitoba or are not purchasing Amazon Web Services services for resale.
        public let canadaRetailSalesTaxNumber: String?
        ///  The value for this parameter must be true if the provincialSalesTaxId value is provided for a TRN in British Columbia, Saskatchewan, or Manitoba provinces.  To claim a provincial sales tax (PST) and retail sales tax (RST) reseller exemption, you must confirm that purchases  from this account were made for resale. Otherwise, remove the PST or RST number from the provincialSalesTaxId parameter from your request.
        public let isResellerAccount: Bool?
        ///  The provincial sales tax ID for your TRN in Canada. This parameter can represent the following:    Provincial sales tax ID number for British Columbia and Saskatchewan provinces   Manitoba retail sales tax ID number for Manitoba province   Quebec sales tax ID number for Quebec province   The Tax Setting API only accepts this parameter if the TRN is specified  for the previous provinces. For other provinces, the Tax Settings API doesn't accept this parameter.
        public let provincialSalesTaxId: String?

        @inlinable
        public init(canadaQuebecSalesTaxNumber: String? = nil, canadaRetailSalesTaxNumber: String? = nil, isResellerAccount: Bool? = nil, provincialSalesTaxId: String? = nil) {
            self.canadaQuebecSalesTaxNumber = canadaQuebecSalesTaxNumber
            self.canadaRetailSalesTaxNumber = canadaRetailSalesTaxNumber
            self.isResellerAccount = isResellerAccount
            self.provincialSalesTaxId = provincialSalesTaxId
        }

        public func validate(name: String) throws {
            try self.validate(self.canadaQuebecSalesTaxNumber, name: "canadaQuebecSalesTaxNumber", parent: name, pattern: "^([0-9]{10})(TQ[0-9]{4})?$")
            try self.validate(self.canadaRetailSalesTaxNumber, name: "canadaRetailSalesTaxNumber", parent: name, pattern: "^([0-9]{6}-[0-9]{1})$")
            try self.validate(self.provincialSalesTaxId, name: "provincialSalesTaxId", parent: name, max: 16)
            try self.validate(self.provincialSalesTaxId, name: "provincialSalesTaxId", parent: name, min: 7)
            try self.validate(self.provincialSalesTaxId, name: "provincialSalesTaxId", parent: name, pattern: "^([0-9A-Z/-]+)$")
        }

        private enum CodingKeys: String, CodingKey {
            case canadaQuebecSalesTaxNumber = "canadaQuebecSalesTaxNumber"
            case canadaRetailSalesTaxNumber = "canadaRetailSalesTaxNumber"
            case isResellerAccount = "isResellerAccount"
            case provincialSalesTaxId = "provincialSalesTaxId"
        }
    }

    public struct ConflictException: AWSErrorShape {
        /// 409
        public let errorCode: String
        public let message: String

        @inlinable
        public init(errorCode: String, message: String) {
            self.errorCode = errorCode
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "errorCode"
            case message = "message"
        }
    }

    public struct DeleteSupplementalTaxRegistrationRequest: AWSEncodableShape {
        ///  The unique authority Id for the supplemental TRN information that needs to be deleted.
        public let authorityId: String

        @inlinable
        public init(authorityId: String) {
            self.authorityId = authorityId
        }

        public func validate(name: String) throws {
            try self.validate(self.authorityId, name: "authorityId", parent: name, max: 200)
            try self.validate(self.authorityId, name: "authorityId", parent: name, min: 1)
            try self.validate(self.authorityId, name: "authorityId", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case authorityId = "authorityId"
        }
    }

    public struct DeleteSupplementalTaxRegistrationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTaxRegistrationRequest: AWSEncodableShape {
        /// Unique account identifier for the TRN information that needs to be deleted. If this isn't passed, the account ID corresponding to the credentials of the API caller will be used for this parameter.
        public let accountId: String?

        @inlinable
        public init(accountId: String? = nil) {
            self.accountId = accountId
        }

        public func validate(name: String) throws {
            try self.validate(self.accountId, name: "accountId", parent: name, max: 12)
            try self.validate(self.accountId, name: "accountId", parent: name, min: 12)
            try self.validate(self.accountId, name: "accountId", parent: name, pattern: "^\\d+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
        }
    }

    public struct DeleteTaxRegistrationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DestinationS3Location: AWSEncodableShape {
        /// The name of your Amazon S3 bucket that you specify to download your tax documents to.
        public let bucket: String
        /// The Amazon S3 object prefix that you specify for your tax document file.
        public let prefix: String?

        @inlinable
        public init(bucket: String, prefix: String? = nil) {
            self.bucket = bucket
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)$")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 512)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: "^.*\\S.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "bucket"
            case prefix = "prefix"
        }
    }

    public struct EgyptAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The unique identification number provided by the Egypt Tax Authority.
        public let uniqueIdentificationNumber: String?
        /// The expiration date of the unique identification number provided by the Egypt Tax Authority.
        public let uniqueIdentificationNumberExpirationDate: String?

        @inlinable
        public init(uniqueIdentificationNumber: String? = nil, uniqueIdentificationNumberExpirationDate: String? = nil) {
            self.uniqueIdentificationNumber = uniqueIdentificationNumber
            self.uniqueIdentificationNumberExpirationDate = uniqueIdentificationNumberExpirationDate
        }

        public func validate(name: String) throws {
            try self.validate(self.uniqueIdentificationNumber, name: "uniqueIdentificationNumber", parent: name, pattern: "^[a-zA-Z0-9]{39}$")
            try self.validate(self.uniqueIdentificationNumberExpirationDate, name: "uniqueIdentificationNumberExpirationDate", parent: name, pattern: "^(\\d{4}-(0[0-9]|1[0-2])-([0-2][0-9]|3[0-1]))$")
        }

        private enum CodingKeys: String, CodingKey {
            case uniqueIdentificationNumber = "uniqueIdentificationNumber"
            case uniqueIdentificationNumberExpirationDate = "uniqueIdentificationNumberExpirationDate"
        }
    }

    public struct EstoniaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  Registry commercial code (RCC) for your TRN in Estonia. This value is an eight-numeric string, such as 12345678.
        public let registryCommercialCode: String

        @inlinable
        public init(registryCommercialCode: String) {
            self.registryCommercialCode = registryCommercialCode
        }

        public func validate(name: String) throws {
            try self.validate(self.registryCommercialCode, name: "registryCommercialCode", parent: name, max: 8)
            try self.validate(self.registryCommercialCode, name: "registryCommercialCode", parent: name, min: 8)
            try self.validate(self.registryCommercialCode, name: "registryCommercialCode", parent: name, pattern: "^\\d+$")
        }

        private enum CodingKeys: String, CodingKey {
            case registryCommercialCode = "registryCommercialCode"
        }
    }

    public struct ExemptionCertificate: AWSEncodableShape {
        /// The exemption certificate file content.
        public let documentFile: AWSBase64Data
        /// The exemption certificate file name.
        public let documentName: String

        @inlinable
        public init(documentFile: AWSBase64Data, documentName: String) {
            self.documentFile = documentFile
            self.documentName = documentName
        }

        public func validate(name: String) throws {
            try self.validate(self.documentFile, name: "documentFile", parent: name, max: 4194304)
            try self.validate(self.documentFile, name: "documentFile", parent: name, min: 1)
            try self.validate(self.documentName, name: "documentName", parent: name, max: 128)
            try self.validate(self.documentName, name: "documentName", parent: name, pattern: "^([A-Za-z0-9-_.]+).(pdf|jpg|png)$")
        }

        private enum CodingKeys: String, CodingKey {
            case documentFile = "documentFile"
            case documentName = "documentName"
        }
    }

    public struct GeorgiaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The legal person or physical person assigned to this TRN in Georgia.
        public let personType: PersonType

        @inlinable
        public init(personType: PersonType) {
            self.personType = personType
        }

        private enum CodingKeys: String, CodingKey {
            case personType = "personType"
        }
    }

    public struct GetTaxExemptionTypesRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetTaxExemptionTypesResponse: AWSDecodableShape {
        /// The supported types of tax exemptions.
        public let taxExemptionTypes: [TaxExemptionType]?

        @inlinable
        public init(taxExemptionTypes: [TaxExemptionType]? = nil) {
            self.taxExemptionTypes = taxExemptionTypes
        }

        private enum CodingKeys: String, CodingKey {
            case taxExemptionTypes = "taxExemptionTypes"
        }
    }

    public struct GetTaxInheritanceRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetTaxInheritanceResponse: AWSDecodableShape {
        /// The tax inheritance status.
        public let heritageStatus: HeritageStatus?

        @inlinable
        public init(heritageStatus: HeritageStatus? = nil) {
            self.heritageStatus = heritageStatus
        }

        private enum CodingKeys: String, CodingKey {
            case heritageStatus = "heritageStatus"
        }
    }

    public struct GetTaxRegistrationDocumentRequest: AWSEncodableShape {
        /// The Amazon S3 bucket that you specify to download your tax documents to.
        public let destinationS3Location: DestinationS3Location?
        /// The metadata for your tax document.
        public let taxDocumentMetadata: TaxDocumentMetadata

        @inlinable
        public init(destinationS3Location: DestinationS3Location? = nil, taxDocumentMetadata: TaxDocumentMetadata) {
            self.destinationS3Location = destinationS3Location
            self.taxDocumentMetadata = taxDocumentMetadata
        }

        public func validate(name: String) throws {
            try self.destinationS3Location?.validate(name: "\(name).destinationS3Location")
            try self.taxDocumentMetadata.validate(name: "\(name).taxDocumentMetadata")
        }

        private enum CodingKeys: String, CodingKey {
            case destinationS3Location = "destinationS3Location"
            case taxDocumentMetadata = "taxDocumentMetadata"
        }
    }

    public struct GetTaxRegistrationDocumentResponse: AWSDecodableShape {
        /// The file path of the Amazon S3 bucket where you want to download your tax document to.
        public let destinationFilePath: String?
        /// The Amazon S3 presigned URL of the tax registration document.
        public let presignedS3Url: String?

        @inlinable
        public init(destinationFilePath: String? = nil, presignedS3Url: String? = nil) {
            self.destinationFilePath = destinationFilePath
            self.presignedS3Url = presignedS3Url
        }

        private enum CodingKeys: String, CodingKey {
            case destinationFilePath = "destinationFilePath"
            case presignedS3Url = "presignedS3Url"
        }
    }

    public struct GetTaxRegistrationRequest: AWSEncodableShape {
        /// Your unique account identifier.
        public let accountId: String?

        @inlinable
        public init(accountId: String? = nil) {
            self.accountId = accountId
        }

        public func validate(name: String) throws {
            try self.validate(self.accountId, name: "accountId", parent: name, max: 12)
            try self.validate(self.accountId, name: "accountId", parent: name, min: 12)
            try self.validate(self.accountId, name: "accountId", parent: name, pattern: "^\\d+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
        }
    }

    public struct GetTaxRegistrationResponse: AWSDecodableShape {
        /// TRN information of the account mentioned in the request.
        public let taxRegistration: TaxRegistration?

        @inlinable
        public init(taxRegistration: TaxRegistration? = nil) {
            self.taxRegistration = taxRegistration
        }

        private enum CodingKeys: String, CodingKey {
            case taxRegistration = "taxRegistration"
        }
    }

    public struct GreeceAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The code of contracting authority for e-invoicing.
        public let contractingAuthorityCode: String?

        @inlinable
        public init(contractingAuthorityCode: String? = nil) {
            self.contractingAuthorityCode = contractingAuthorityCode
        }

        public func validate(name: String) throws {
            try self.validate(self.contractingAuthorityCode, name: "contractingAuthorityCode", parent: name, pattern: "^\\d{4}\\.[A-Z]\\d{5}\\.\\d{4}$")
        }

        private enum CodingKeys: String, CodingKey {
            case contractingAuthorityCode = "contractingAuthorityCode"
        }
    }

    public struct IndiaAdditionalInfo: AWSDecodableShape {
        ///  India pan information associated with the account.
        public let pan: String?

        @inlinable
        public init(pan: String? = nil) {
            self.pan = pan
        }

        private enum CodingKeys: String, CodingKey {
            case pan = "pan"
        }
    }

    public struct IndonesiaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// VAT-exempt customers have a Directorate General of Taxation (DGT) exemption letter or certificate (Surat Keterangan Bebas) decision number. Non-collected VAT have a DGT letter or certificate (Surat Keterangan Tidak Dipungut).
        public let decisionNumber: String?
        /// Exception code if you are designated by Directorate General of Taxation (DGT) as a VAT collector, non-collected VAT, or VAT-exempt customer.
        public let ppnExceptionDesignationCode: String?
        /// The tax registration number type.
        public let taxRegistrationNumberType: IndonesiaTaxRegistrationNumberType?

        @inlinable
        public init(decisionNumber: String? = nil, ppnExceptionDesignationCode: String? = nil, taxRegistrationNumberType: IndonesiaTaxRegistrationNumberType? = nil) {
            self.decisionNumber = decisionNumber
            self.ppnExceptionDesignationCode = ppnExceptionDesignationCode
            self.taxRegistrationNumberType = taxRegistrationNumberType
        }

        public func validate(name: String) throws {
            try self.validate(self.decisionNumber, name: "decisionNumber", parent: name, pattern: "^([a-zA-Z0-9/.\\-]{0,200})$")
            try self.validate(self.ppnExceptionDesignationCode, name: "ppnExceptionDesignationCode", parent: name, pattern: "^(01|02|03|07|08)$")
        }

        private enum CodingKeys: String, CodingKey {
            case decisionNumber = "decisionNumber"
            case ppnExceptionDesignationCode = "ppnExceptionDesignationCode"
            case taxRegistrationNumberType = "taxRegistrationNumberType"
        }
    }

    public struct InternalServerException: AWSErrorShape {
        /// 500
        public let errorCode: String
        public let message: String

        @inlinable
        public init(errorCode: String, message: String) {
            self.errorCode = errorCode
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "errorCode"
            case message = "message"
        }
    }

    public struct IsraelAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  Customer type for your TRN in Israel. The value can be Business or Individual. Use Businessfor entities such as not-for-profit and financial institutions.
        public let customerType: IsraelCustomerType
        ///  Dealer type for your TRN in Israel. If you're not a local authorized dealer with an Israeli VAT ID, specify your tax identification number so that Amazon Web Services can send you a compliant tax invoice.
        public let dealerType: IsraelDealerType

        @inlinable
        public init(customerType: IsraelCustomerType, dealerType: IsraelDealerType) {
            self.customerType = customerType
            self.dealerType = dealerType
        }

        private enum CodingKeys: String, CodingKey {
            case customerType = "customerType"
            case dealerType = "dealerType"
        }
    }

    public struct ItalyAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The tender procedure identification code.
        public let cigNumber: String?
        ///  Additional tax information to specify for a TRN in Italy. This is managed by the Interministerial Committee for Economic Planning (CIPE) which characterizes every public investment project (Individual Project Code).
        public let cupNumber: String?
        ///  Additional tax information to specify for a TRN in Italy. Use CodiceDestinatario to receive your invoices via web service (API) or FTP.
        public let sdiAccountId: String?
        /// List of service tax codes for your TRN in Italy. You can use your customer tax code as part of a VAT Group.
        public let taxCode: String?

        @inlinable
        public init(cigNumber: String? = nil, cupNumber: String? = nil, sdiAccountId: String? = nil, taxCode: String? = nil) {
            self.cigNumber = cigNumber
            self.cupNumber = cupNumber
            self.sdiAccountId = sdiAccountId
            self.taxCode = taxCode
        }

        public func validate(name: String) throws {
            try self.validate(self.cigNumber, name: "cigNumber", parent: name, pattern: "^([0-9A-Z]{1,15})$")
            try self.validate(self.cupNumber, name: "cupNumber", parent: name, pattern: "^([0-9A-Z]{1,15})$")
            try self.validate(self.sdiAccountId, name: "sdiAccountId", parent: name, pattern: "^[0-9A-Z]{6,7}$")
            try self.validate(self.taxCode, name: "taxCode", parent: name, pattern: "^([0-9]{11}|[A-Z]{6}[0-9]{2}[A-Z][0-9]{2}[A-Z][0-9]{3}[A-Z])$")
        }

        private enum CodingKeys: String, CodingKey {
            case cigNumber = "cigNumber"
            case cupNumber = "cupNumber"
            case sdiAccountId = "sdiAccountId"
            case taxCode = "taxCode"
        }
    }

    public struct Jurisdiction: AWSDecodableShape {
        ///  The country code of the jurisdiction.
        public let countryCode: String
        ///  The state, region, or province associated with the country of the jurisdiction, if applicable.
        public let stateOrRegion: String?

        @inlinable
        public init(countryCode: String, stateOrRegion: String? = nil) {
            self.countryCode = countryCode
            self.stateOrRegion = stateOrRegion
        }

        private enum CodingKeys: String, CodingKey {
            case countryCode = "countryCode"
            case stateOrRegion = "stateOrRegion"
        }
    }

    public struct KenyaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The legal person or physical person assigned to this TRN in Kenya.
        public let personType: PersonType

        @inlinable
        public init(personType: PersonType) {
            self.personType = personType
        }

        private enum CodingKeys: String, CodingKey {
            case personType = "personType"
        }
    }

    public struct ListSupplementalTaxRegistrationsRequest: AWSEncodableShape {
        ///  The number of taxRegistrations results you want in one response.
        public let maxResults: Int?
        ///  The token to retrieve the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-A-Za-z0-9_+\\=\\/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "maxResults"
            case nextToken = "nextToken"
        }
    }

    public struct ListSupplementalTaxRegistrationsResponse: AWSDecodableShape {
        ///  The token to retrieve the next set of results.
        public let nextToken: String?
        ///  The list of supplemental tax registrations.
        public let taxRegistrations: [SupplementalTaxRegistration]

        @inlinable
        public init(nextToken: String? = nil, taxRegistrations: [SupplementalTaxRegistration]) {
            self.nextToken = nextToken
            self.taxRegistrations = taxRegistrations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case taxRegistrations = "taxRegistrations"
        }
    }

    public struct ListTaxExemptionsRequest: AWSEncodableShape {
        /// The number of results you want in one response.
        public let maxResults: Int?
        /// The token to retrieve the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-A-Za-z0-9_+\\=\\/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "maxResults"
            case nextToken = "nextToken"
        }
    }

    public struct ListTaxExemptionsResponse: AWSDecodableShape {
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// The tax exemption details map of accountId and tax exemption details.
        public let taxExemptionDetailsMap: [String: TaxExemptionDetails]?

        @inlinable
        public init(nextToken: String? = nil, taxExemptionDetailsMap: [String: TaxExemptionDetails]? = nil) {
            self.nextToken = nextToken
            self.taxExemptionDetailsMap = taxExemptionDetailsMap
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case taxExemptionDetailsMap = "taxExemptionDetailsMap"
        }
    }

    public struct ListTaxRegistrationsRequest: AWSEncodableShape {
        /// Number of accountDetails results you want in one response.
        public let maxResults: Int?
        /// The token to retrieve the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2000)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-A-Za-z0-9_+\\=\\/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "maxResults"
            case nextToken = "nextToken"
        }
    }

    public struct ListTaxRegistrationsResponse: AWSDecodableShape {
        /// The list of account details. This contains account Ids and TRN Information for each of the linked accounts.
        public let accountDetails: [AccountDetails]
        ///  The token to retrieve the next set of results.
        public let nextToken: String?

        @inlinable
        public init(accountDetails: [AccountDetails], nextToken: String? = nil) {
            self.accountDetails = accountDetails
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accountDetails = "accountDetails"
            case nextToken = "nextToken"
        }
    }

    public struct MalaysiaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The tax registration number (TRN) in Malaysia.  For individual, you can specify the taxInformationNumber in MalaysiaAdditionalInfo with NRIC type, and a valid MyKad or NRIC number. For business, you must specify a businessRegistrationNumber in MalaysiaAdditionalInfo with a TIN type and tax identification number. For business resellers, you must specify a businessRegistrationNumber and taxInformationNumber in MalaysiaAdditionalInfo with a sales and service tax (SST) type and a valid SST number.  For business resellers with service codes, you must specify businessRegistrationNumber, taxInformationNumber, and distinct serviceTaxCodes in MalaysiaAdditionalInfo with a SST type and valid sales and service tax (SST) number. By using this API operation, Amazon Web Services registers your self-declaration that you’re an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD), and have a valid SST number.
        public let businessRegistrationNumber: String?
        /// List of service tax codes for your TRN in Malaysia.
        public let serviceTaxCodes: [MalaysiaServiceTaxCode]?
        /// The tax information number in Malaysia.   For individual, you can specify the taxInformationNumber in MalaysiaAdditionalInfo with NRIC type, and a valid MyKad or NRIC number. For business resellers, you must specify a businessRegistrationNumber and taxInformationNumber in MalaysiaAdditionalInfo with a sales and service tax (SST) type and a valid SST number.  For business resellers with service codes, you must specify businessRegistrationNumber, taxInformationNumber, and distinct serviceTaxCodes in MalaysiaAdditionalInfo with a SST type and valid sales and service tax (SST) number. By using this API operation, Amazon Web Services registers your self-declaration that you’re an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD), and have a valid SST number.
        public let taxInformationNumber: String?

        @inlinable
        public init(businessRegistrationNumber: String? = nil, serviceTaxCodes: [MalaysiaServiceTaxCode]? = nil, taxInformationNumber: String? = nil) {
            self.businessRegistrationNumber = businessRegistrationNumber
            self.serviceTaxCodes = serviceTaxCodes
            self.taxInformationNumber = taxInformationNumber
        }

        public func validate(name: String) throws {
            try self.validate(self.businessRegistrationNumber, name: "businessRegistrationNumber", parent: name, pattern: "^[0-9]{12}$")
            try self.validate(self.serviceTaxCodes, name: "serviceTaxCodes", parent: name, max: 4)
            try self.validate(self.taxInformationNumber, name: "taxInformationNumber", parent: name, pattern: "^[A-Z]{1,2}[0-9]{1,11}$")
        }

        private enum CodingKeys: String, CodingKey {
            case businessRegistrationNumber = "businessRegistrationNumber"
            case serviceTaxCodes = "serviceTaxCodes"
            case taxInformationNumber = "taxInformationNumber"
        }
    }

    public struct PolandAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The individual tax registration number (NIP). Individual NIP is valid for other taxes excluding VAT purposes.
        public let individualRegistrationNumber: String?
        ///  True if your business is a member of a VAT group with a NIP active for VAT purposes. Otherwise, this is false.
        public let isGroupVatEnabled: Bool?

        @inlinable
        public init(individualRegistrationNumber: String? = nil, isGroupVatEnabled: Bool? = nil) {
            self.individualRegistrationNumber = individualRegistrationNumber
            self.isGroupVatEnabled = isGroupVatEnabled
        }

        public func validate(name: String) throws {
            try self.validate(self.individualRegistrationNumber, name: "individualRegistrationNumber", parent: name, pattern: "^([0-9]{10})$")
        }

        private enum CodingKeys: String, CodingKey {
            case individualRegistrationNumber = "individualRegistrationNumber"
            case isGroupVatEnabled = "isGroupVatEnabled"
        }
    }

    public struct PutSupplementalTaxRegistrationRequest: AWSEncodableShape {
        ///  The supplemental TRN information that will be stored for the caller account ID.
        public let taxRegistrationEntry: SupplementalTaxRegistrationEntry

        @inlinable
        public init(taxRegistrationEntry: SupplementalTaxRegistrationEntry) {
            self.taxRegistrationEntry = taxRegistrationEntry
        }

        public func validate(name: String) throws {
            try self.taxRegistrationEntry.validate(name: "\(name).taxRegistrationEntry")
        }

        private enum CodingKeys: String, CodingKey {
            case taxRegistrationEntry = "taxRegistrationEntry"
        }
    }

    public struct PutSupplementalTaxRegistrationResponse: AWSDecodableShape {
        ///  Unique authority ID for the supplemental TRN information that was stored.
        public let authorityId: String
        ///  The status of the supplemental TRN stored in the system after processing. Based on the validation occurring on the TRN, the status can be Verified, Pending, Rejected, or Deleted.
        public let status: TaxRegistrationStatus

        @inlinable
        public init(authorityId: String, status: TaxRegistrationStatus) {
            self.authorityId = authorityId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case authorityId = "authorityId"
            case status = "status"
        }
    }

    public struct PutTaxExemptionRequest: AWSEncodableShape {
        ///  The list of unique account identifiers.
        public let accountIds: [String]
        public let authority: Authority
        public let exemptionCertificate: ExemptionCertificate
        /// The exemption type. Use the supported tax exemption type description.
        public let exemptionType: String

        @inlinable
        public init(accountIds: [String], authority: Authority, exemptionCertificate: ExemptionCertificate, exemptionType: String) {
            self.accountIds = accountIds
            self.authority = authority
            self.exemptionCertificate = exemptionCertificate
            self.exemptionType = exemptionType
        }

        public func validate(name: String) throws {
            try self.accountIds.forEach {
                try validate($0, name: "accountIds[]", parent: name, max: 12)
                try validate($0, name: "accountIds[]", parent: name, min: 12)
                try validate($0, name: "accountIds[]", parent: name, pattern: "^\\d+$")
            }
            try self.authority.validate(name: "\(name).authority")
            try self.exemptionCertificate.validate(name: "\(name).exemptionCertificate")
            try self.validate(self.exemptionType, name: "exemptionType", parent: name, max: 200)
            try self.validate(self.exemptionType, name: "exemptionType", parent: name, min: 1)
            try self.validate(self.exemptionType, name: "exemptionType", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case accountIds = "accountIds"
            case authority = "authority"
            case exemptionCertificate = "exemptionCertificate"
            case exemptionType = "exemptionType"
        }
    }

    public struct PutTaxExemptionResponse: AWSDecodableShape {
        /// The customer support case ID.
        public let caseId: String?

        @inlinable
        public init(caseId: String? = nil) {
            self.caseId = caseId
        }

        private enum CodingKeys: String, CodingKey {
            case caseId = "caseId"
        }
    }

    public struct PutTaxInheritanceRequest: AWSEncodableShape {
        /// The tax inheritance status.
        public let heritageStatus: HeritageStatus?

        @inlinable
        public init(heritageStatus: HeritageStatus? = nil) {
            self.heritageStatus = heritageStatus
        }

        private enum CodingKeys: String, CodingKey {
            case heritageStatus = "heritageStatus"
        }
    }

    public struct PutTaxInheritanceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct PutTaxRegistrationRequest: AWSEncodableShape {
        /// Your unique account identifier.
        public let accountId: String?
        ///  Your TRN information that will be stored to the account mentioned in accountId.
        public let taxRegistrationEntry: TaxRegistrationEntry

        @inlinable
        public init(accountId: String? = nil, taxRegistrationEntry: TaxRegistrationEntry) {
            self.accountId = accountId
            self.taxRegistrationEntry = taxRegistrationEntry
        }

        public func validate(name: String) throws {
            try self.validate(self.accountId, name: "accountId", parent: name, max: 12)
            try self.validate(self.accountId, name: "accountId", parent: name, min: 12)
            try self.validate(self.accountId, name: "accountId", parent: name, pattern: "^\\d+$")
            try self.taxRegistrationEntry.validate(name: "\(name).taxRegistrationEntry")
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "accountId"
            case taxRegistrationEntry = "taxRegistrationEntry"
        }
    }

    public struct PutTaxRegistrationResponse: AWSDecodableShape {
        /// The status of your TRN stored in the system after processing. Based on the validation occurring on the TRN, the status can be Verified, Pending or Rejected.
        public let status: TaxRegistrationStatus?

        @inlinable
        public init(status: TaxRegistrationStatus? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "status"
        }
    }

    public struct ResourceNotFoundException: AWSErrorShape {
        /// 404
        public let errorCode: String
        public let message: String

        @inlinable
        public init(errorCode: String, message: String) {
            self.errorCode = errorCode
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "errorCode"
            case message = "message"
        }
    }

    public struct RomaniaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The tax registration number type. The value can be TaxRegistrationNumber or LocalRegistrationNumber.
        public let taxRegistrationNumberType: TaxRegistrationNumberType

        @inlinable
        public init(taxRegistrationNumberType: TaxRegistrationNumberType) {
            self.taxRegistrationNumberType = taxRegistrationNumberType
        }

        private enum CodingKeys: String, CodingKey {
            case taxRegistrationNumberType = "taxRegistrationNumberType"
        }
    }

    public struct SaudiArabiaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The tax registration number type.
        public let taxRegistrationNumberType: SaudiArabiaTaxRegistrationNumberType?

        @inlinable
        public init(taxRegistrationNumberType: SaudiArabiaTaxRegistrationNumberType? = nil) {
            self.taxRegistrationNumberType = taxRegistrationNumberType
        }

        private enum CodingKeys: String, CodingKey {
            case taxRegistrationNumberType = "taxRegistrationNumberType"
        }
    }

    public struct SourceS3Location: AWSEncodableShape {
        /// The name of your Amazon S3 bucket that your tax document is located.
        public let bucket: String
        /// The object key of your tax document object in Amazon S3.
        public let key: String

        @inlinable
        public init(bucket: String, key: String) {
            self.bucket = bucket
            self.key = key
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, max: 63)
            try self.validate(self.bucket, name: "bucket", parent: name, min: 3)
            try self.validate(self.bucket, name: "bucket", parent: name, pattern: "^(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)$")
            try self.validate(self.key, name: "key", parent: name, max: 1024)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^.*\\S.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "bucket"
            case key = "key"
        }
    }

    public struct SouthKoreaAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The business legal name based on the most recently uploaded tax registration certificate.
        public let businessRepresentativeName: String
        /// Item of business based on the most recently uploaded tax registration certificate.
        public let itemOfBusiness: String
        /// Line of business based on the most recently uploaded tax registration certificate.
        public let lineOfBusiness: String

        @inlinable
        public init(businessRepresentativeName: String, itemOfBusiness: String, lineOfBusiness: String) {
            self.businessRepresentativeName = businessRepresentativeName
            self.itemOfBusiness = itemOfBusiness
            self.lineOfBusiness = lineOfBusiness
        }

        public func validate(name: String) throws {
            try self.validate(self.businessRepresentativeName, name: "businessRepresentativeName", parent: name, max: 200)
            try self.validate(self.businessRepresentativeName, name: "businessRepresentativeName", parent: name, min: 1)
            try self.validate(self.businessRepresentativeName, name: "businessRepresentativeName", parent: name, pattern: "^[0-9\\u3130-\\u318F\\uAC00-\\uD7AF,.( )-\\\\s]*$")
            try self.validate(self.itemOfBusiness, name: "itemOfBusiness", parent: name, max: 100)
            try self.validate(self.itemOfBusiness, name: "itemOfBusiness", parent: name, min: 1)
            try self.validate(self.itemOfBusiness, name: "itemOfBusiness", parent: name, pattern: "^[0-9\\u3130-\\u318F\\uAC00-\\uD7AF,.( )-\\\\s]*$")
            try self.validate(self.lineOfBusiness, name: "lineOfBusiness", parent: name, max: 100)
            try self.validate(self.lineOfBusiness, name: "lineOfBusiness", parent: name, min: 1)
            try self.validate(self.lineOfBusiness, name: "lineOfBusiness", parent: name, pattern: "^[0-9\\u3130-\\u318F\\uAC00-\\uD7AF,.( )-\\\\s]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case businessRepresentativeName = "businessRepresentativeName"
            case itemOfBusiness = "itemOfBusiness"
            case lineOfBusiness = "lineOfBusiness"
        }
    }

    public struct SpainAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The registration type in Spain.
        public let registrationType: RegistrationType

        @inlinable
        public init(registrationType: RegistrationType) {
            self.registrationType = registrationType
        }

        private enum CodingKeys: String, CodingKey {
            case registrationType = "registrationType"
        }
    }

    public struct SupplementalTaxRegistration: AWSDecodableShape {
        public let address: Address
        ///  Unique authority ID for the supplemental TRN.
        public let authorityId: String
        ///  The legal name associated with your TRN registration.
        public let legalName: String
        ///  The supplemental TRN unique identifier.
        public let registrationId: String
        ///  Type of supplemental TRN. Currently, this can only be VAT.
        public let registrationType: SupplementalTaxRegistrationType
        ///  The status of your TRN.
        public let status: TaxRegistrationStatus

        @inlinable
        public init(address: Address, authorityId: String, legalName: String, registrationId: String, registrationType: SupplementalTaxRegistrationType, status: TaxRegistrationStatus) {
            self.address = address
            self.authorityId = authorityId
            self.legalName = legalName
            self.registrationId = registrationId
            self.registrationType = registrationType
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case address = "address"
            case authorityId = "authorityId"
            case legalName = "legalName"
            case registrationId = "registrationId"
            case registrationType = "registrationType"
            case status = "status"
        }
    }

    public struct SupplementalTaxRegistrationEntry: AWSEncodableShape {
        public let address: Address
        ///  The legal name associated with your TRN registration.
        public let legalName: String
        ///  The supplemental TRN unique identifier.
        public let registrationId: String
        ///  Type of supplemental TRN. Currently, this can only be VAT.
        public let registrationType: SupplementalTaxRegistrationType

        @inlinable
        public init(address: Address, legalName: String, registrationId: String, registrationType: SupplementalTaxRegistrationType) {
            self.address = address
            self.legalName = legalName
            self.registrationId = registrationId
            self.registrationType = registrationType
        }

        public func validate(name: String) throws {
            try self.address.validate(name: "\(name).address")
            try self.validate(self.legalName, name: "legalName", parent: name, max: 200)
            try self.validate(self.legalName, name: "legalName", parent: name, min: 1)
            try self.validate(self.legalName, name: "legalName", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.registrationId, name: "registrationId", parent: name, max: 200)
            try self.validate(self.registrationId, name: "registrationId", parent: name, min: 1)
            try self.validate(self.registrationId, name: "registrationId", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case address = "address"
            case legalName = "legalName"
            case registrationId = "registrationId"
            case registrationType = "registrationType"
        }
    }

    public struct TaxDocumentMetadata: AWSEncodableShape & AWSDecodableShape {
        /// The tax document access token, which contains information that the Tax Settings API uses to locate the tax document.  If you update your tax registration, the existing taxDocumentAccessToken won't be valid. To get the latest token, call the GetTaxRegistration or ListTaxRegistrations API operation. This token is valid for 24 hours.
        public let taxDocumentAccessToken: String
        /// The name of your tax document.
        public let taxDocumentName: String

        @inlinable
        public init(taxDocumentAccessToken: String, taxDocumentName: String) {
            self.taxDocumentAccessToken = taxDocumentAccessToken
            self.taxDocumentName = taxDocumentName
        }

        public func validate(name: String) throws {
            try self.validate(self.taxDocumentAccessToken, name: "taxDocumentAccessToken", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.taxDocumentName, name: "taxDocumentName", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case taxDocumentAccessToken = "taxDocumentAccessToken"
            case taxDocumentName = "taxDocumentName"
        }
    }

    public struct TaxExemption: AWSDecodableShape {
        /// The address domain associate with tax exemption.
        public let authority: Authority
        /// The tax exemption effective date.
        public let effectiveDate: Date?
        /// The tax exemption expiration date.
        public let expirationDate: Date?
        /// The tax exemption status.
        public let status: EntityExemptionAccountStatus?
        /// The tax exemption recording time in the TaxSettings system.
        public let systemEffectiveDate: Date?
        /// The tax exemption type.
        public let taxExemptionType: TaxExemptionType

        @inlinable
        public init(authority: Authority, effectiveDate: Date? = nil, expirationDate: Date? = nil, status: EntityExemptionAccountStatus? = nil, systemEffectiveDate: Date? = nil, taxExemptionType: TaxExemptionType) {
            self.authority = authority
            self.effectiveDate = effectiveDate
            self.expirationDate = expirationDate
            self.status = status
            self.systemEffectiveDate = systemEffectiveDate
            self.taxExemptionType = taxExemptionType
        }

        private enum CodingKeys: String, CodingKey {
            case authority = "authority"
            case effectiveDate = "effectiveDate"
            case expirationDate = "expirationDate"
            case status = "status"
            case systemEffectiveDate = "systemEffectiveDate"
            case taxExemptionType = "taxExemptionType"
        }
    }

    public struct TaxExemptionDetails: AWSDecodableShape {
        /// The indicator if the tax exemption is inherited from the consolidated billing family management account.
        public let heritageObtainedDetails: Bool?
        /// The consolidated billing family management account the tax exemption inherited from.
        public let heritageObtainedParentEntity: String?
        /// The reason of the heritage inheritance.
        public let heritageObtainedReason: String?
        /// Tax exemptions.
        public let taxExemptions: [TaxExemption]?

        @inlinable
        public init(heritageObtainedDetails: Bool? = nil, heritageObtainedParentEntity: String? = nil, heritageObtainedReason: String? = nil, taxExemptions: [TaxExemption]? = nil) {
            self.heritageObtainedDetails = heritageObtainedDetails
            self.heritageObtainedParentEntity = heritageObtainedParentEntity
            self.heritageObtainedReason = heritageObtainedReason
            self.taxExemptions = taxExemptions
        }

        private enum CodingKeys: String, CodingKey {
            case heritageObtainedDetails = "heritageObtainedDetails"
            case heritageObtainedParentEntity = "heritageObtainedParentEntity"
            case heritageObtainedReason = "heritageObtainedReason"
            case taxExemptions = "taxExemptions"
        }
    }

    public struct TaxExemptionType: AWSDecodableShape {
        /// The tax exemption's applicable jurisdictions.
        public let applicableJurisdictions: [Authority]?
        /// The tax exemption's type description.
        public let description: String?
        /// The tax exemption's type display name.
        public let displayName: String?

        @inlinable
        public init(applicableJurisdictions: [Authority]? = nil, description: String? = nil, displayName: String? = nil) {
            self.applicableJurisdictions = applicableJurisdictions
            self.description = description
            self.displayName = displayName
        }

        private enum CodingKeys: String, CodingKey {
            case applicableJurisdictions = "applicableJurisdictions"
            case description = "description"
            case displayName = "displayName"
        }
    }

    public struct TaxInheritanceDetails: AWSDecodableShape {
        ///  Tax inheritance reason information associated with the account.
        public let inheritanceObtainedReason: String?
        ///  Tax inheritance parent account information associated with the account.
        public let parentEntityId: String?

        @inlinable
        public init(inheritanceObtainedReason: String? = nil, parentEntityId: String? = nil) {
            self.inheritanceObtainedReason = inheritanceObtainedReason
            self.parentEntityId = parentEntityId
        }

        private enum CodingKeys: String, CodingKey {
            case inheritanceObtainedReason = "inheritanceObtainedReason"
            case parentEntityId = "parentEntityId"
        }
    }

    public struct TaxRegistration: AWSDecodableShape {
        ///  Additional tax information associated with your TRN.
        public let additionalTaxInformation: AdditionalInfoResponse?
        /// The email address to receive VAT invoices.
        public let certifiedEmailId: String?
        ///  The legal address associated with your TRN registration.
        public let legalAddress: Address
        ///  The legal name associated with your TRN registration.
        public let legalName: String
        ///  Your tax registration unique identifier.
        public let registrationId: String
        /// Type of your tax registration.
        public let registrationType: TaxRegistrationType
        /// The industry that describes your business. For business-to-business (B2B) customers, specify Business. For business-to-consumer (B2C) customers, specify Individual. For business-to-government (B2G), specify Government. Note that certain values may not applicable for the request country. Please refer to country specific information in API document.
        public let sector: Sector?
        ///  The status of your TRN. This can be either Verified, Pending, Deleted, or Rejected.
        public let status: TaxRegistrationStatus
        /// The metadata for your tax document.
        public let taxDocumentMetadatas: [TaxDocumentMetadata]?

        @inlinable
        public init(additionalTaxInformation: AdditionalInfoResponse? = nil, certifiedEmailId: String? = nil, legalAddress: Address, legalName: String, registrationId: String, registrationType: TaxRegistrationType, sector: Sector? = nil, status: TaxRegistrationStatus, taxDocumentMetadatas: [TaxDocumentMetadata]? = nil) {
            self.additionalTaxInformation = additionalTaxInformation
            self.certifiedEmailId = certifiedEmailId
            self.legalAddress = legalAddress
            self.legalName = legalName
            self.registrationId = registrationId
            self.registrationType = registrationType
            self.sector = sector
            self.status = status
            self.taxDocumentMetadatas = taxDocumentMetadatas
        }

        private enum CodingKeys: String, CodingKey {
            case additionalTaxInformation = "additionalTaxInformation"
            case certifiedEmailId = "certifiedEmailId"
            case legalAddress = "legalAddress"
            case legalName = "legalName"
            case registrationId = "registrationId"
            case registrationType = "registrationType"
            case sector = "sector"
            case status = "status"
            case taxDocumentMetadatas = "taxDocumentMetadatas"
        }
    }

    public struct TaxRegistrationDocFile: AWSEncodableShape {
        /// The tax registration document content.
        public let fileContent: AWSBase64Data
        /// The tax registration document name.
        public let fileName: String

        @inlinable
        public init(fileContent: AWSBase64Data, fileName: String) {
            self.fileContent = fileContent
            self.fileName = fileName
        }

        public func validate(name: String) throws {
            try self.validate(self.fileContent, name: "fileContent", parent: name, max: 5242880)
            try self.validate(self.fileContent, name: "fileContent", parent: name, min: 1)
            try self.validate(self.fileName, name: "fileName", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case fileContent = "fileContent"
            case fileName = "fileName"
        }
    }

    public struct TaxRegistrationDocument: AWSEncodableShape {
        /// The tax registration document.
        public let file: TaxRegistrationDocFile?
        /// The Amazon S3 location where your tax registration document is stored.
        public let s3Location: SourceS3Location?

        @inlinable
        public init(file: TaxRegistrationDocFile? = nil, s3Location: SourceS3Location? = nil) {
            self.file = file
            self.s3Location = s3Location
        }

        public func validate(name: String) throws {
            try self.file?.validate(name: "\(name).file")
            try self.s3Location?.validate(name: "\(name).s3Location")
        }

        private enum CodingKeys: String, CodingKey {
            case file = "file"
            case s3Location = "s3Location"
        }
    }

    public struct TaxRegistrationEntry: AWSEncodableShape {
        ///  Additional tax information associated with your TRN. You only need to specify this parameter if Amazon Web Services collects any additional information for your country within AdditionalInfoRequest.
        public let additionalTaxInformation: AdditionalInfoRequest?
        /// The email address to receive VAT invoices.
        public let certifiedEmailId: String?
        /// The legal address associated with your TRN.  If you're setting a TRN in Brazil for the CNPJ tax type, you don't need to specify the legal address.  For TRNs in other countries and for CPF tax types Brazil, you must specify the legal address.
        public let legalAddress: Address?
        /// The legal name associated with your TRN.   If you're setting a TRN in Brazil, you don't need to specify the legal name. For TRNs in other countries, you must specify the legal name.
        public let legalName: String?
        /// Your tax registration unique identifier.
        public let registrationId: String
        ///  Your tax registration type. This can be either VAT or GST.
        public let registrationType: TaxRegistrationType
        /// The industry that describes your business. For business-to-business (B2B) customers, specify Business. For business-to-consumer (B2C) customers, specify Individual. For business-to-government (B2G), specify Government.Note that certain values may not applicable for the request country. Please refer to country specific information in API document.
        public let sector: Sector?
        /// Additional details needed to verify your TRN information in Brazil. You only need to specify this parameter when you set a TRN in Brazil that is the CPF tax type.  Don't specify this parameter to set a TRN in Brazil of the CNPJ tax type or to set a TRN for another country.
        public let verificationDetails: VerificationDetails?

        @inlinable
        public init(additionalTaxInformation: AdditionalInfoRequest? = nil, certifiedEmailId: String? = nil, legalAddress: Address? = nil, legalName: String? = nil, registrationId: String, registrationType: TaxRegistrationType, sector: Sector? = nil, verificationDetails: VerificationDetails? = nil) {
            self.additionalTaxInformation = additionalTaxInformation
            self.certifiedEmailId = certifiedEmailId
            self.legalAddress = legalAddress
            self.legalName = legalName
            self.registrationId = registrationId
            self.registrationType = registrationType
            self.sector = sector
            self.verificationDetails = verificationDetails
        }

        public func validate(name: String) throws {
            try self.additionalTaxInformation?.validate(name: "\(name).additionalTaxInformation")
            try self.validate(self.certifiedEmailId, name: "certifiedEmailId", parent: name, pattern: "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,20}$")
            try self.legalAddress?.validate(name: "\(name).legalAddress")
            try self.validate(self.legalName, name: "legalName", parent: name, max: 200)
            try self.validate(self.legalName, name: "legalName", parent: name, min: 1)
            try self.validate(self.legalName, name: "legalName", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.validate(self.registrationId, name: "registrationId", parent: name, max: 200)
            try self.validate(self.registrationId, name: "registrationId", parent: name, min: 1)
            try self.validate(self.registrationId, name: "registrationId", parent: name, pattern: "^(?!\\s*$)[\\s\\S]+$")
            try self.verificationDetails?.validate(name: "\(name).verificationDetails")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalTaxInformation = "additionalTaxInformation"
            case certifiedEmailId = "certifiedEmailId"
            case legalAddress = "legalAddress"
            case legalName = "legalName"
            case registrationId = "registrationId"
            case registrationType = "registrationType"
            case sector = "sector"
            case verificationDetails = "verificationDetails"
        }
    }

    public struct TaxRegistrationWithJurisdiction: AWSDecodableShape {
        /// Additional tax information associated with your TRN.
        public let additionalTaxInformation: AdditionalInfoResponse?
        /// The email address to receive VAT invoices.
        public let certifiedEmailId: String?
        ///  The jurisdiction associated with your TRN information.
        public let jurisdiction: Jurisdiction
        /// The legal name associated with your TRN information.
        public let legalName: String
        /// Your tax registration unique identifier.
        public let registrationId: String
        ///  The type of your tax registration. This can be either VAT or GST.
        public let registrationType: TaxRegistrationType
        /// The industry that describes your business. For business-to-business (B2B) customers, specify Business. For business-to-consumer (B2C) customers, specify Individual. For business-to-government (B2G), specify Government.Note that certain values may not applicable for the request country. Please refer to country specific information in API document.
        public let sector: Sector?
        /// The status of your TRN. This can be either Verified, Pending, Deleted, or Rejected.
        public let status: TaxRegistrationStatus
        /// The metadata for your tax document.
        public let taxDocumentMetadatas: [TaxDocumentMetadata]?

        @inlinable
        public init(additionalTaxInformation: AdditionalInfoResponse? = nil, certifiedEmailId: String? = nil, jurisdiction: Jurisdiction, legalName: String, registrationId: String, registrationType: TaxRegistrationType, sector: Sector? = nil, status: TaxRegistrationStatus, taxDocumentMetadatas: [TaxDocumentMetadata]? = nil) {
            self.additionalTaxInformation = additionalTaxInformation
            self.certifiedEmailId = certifiedEmailId
            self.jurisdiction = jurisdiction
            self.legalName = legalName
            self.registrationId = registrationId
            self.registrationType = registrationType
            self.sector = sector
            self.status = status
            self.taxDocumentMetadatas = taxDocumentMetadatas
        }

        private enum CodingKeys: String, CodingKey {
            case additionalTaxInformation = "additionalTaxInformation"
            case certifiedEmailId = "certifiedEmailId"
            case jurisdiction = "jurisdiction"
            case legalName = "legalName"
            case registrationId = "registrationId"
            case registrationType = "registrationType"
            case sector = "sector"
            case status = "status"
            case taxDocumentMetadatas = "taxDocumentMetadatas"
        }
    }

    public struct TurkeyAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The industry information that tells the Tax Settings API if you're subject to additional withholding taxes. This information required for business-to-business (B2B) customers. This information is conditionally mandatory for B2B customers who are subject to KDV tax.
        public let industries: Industries?
        /// The Registered Electronic Mail (REM) that is used to send notarized communication. This parameter is optional for business-to-business (B2B) and business-to-government (B2G) customers. It's not required for business-to-consumer (B2C) customers.
        public let kepEmailId: String?
        ///  Secondary tax ID (“harcama birimi VKN”si”). If one isn't provided, we will use your VKN as the secondary ID.
        public let secondaryTaxId: String?
        /// The tax office where you're registered. You can enter this information as a string. The Tax Settings API will add this information to your invoice. This parameter is required for business-to-business (B2B) and business-to-government customers. It's not required for business-to-consumer (B2C) customers.
        public let taxOffice: String?

        @inlinable
        public init(industries: Industries? = nil, kepEmailId: String? = nil, secondaryTaxId: String? = nil, taxOffice: String? = nil) {
            self.industries = industries
            self.kepEmailId = kepEmailId
            self.secondaryTaxId = secondaryTaxId
            self.taxOffice = taxOffice
        }

        public func validate(name: String) throws {
            try self.validate(self.kepEmailId, name: "kepEmailId", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.secondaryTaxId, name: "secondaryTaxId", parent: name, pattern: "^([0-9]{10})$")
            try self.validate(self.taxOffice, name: "taxOffice", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case industries = "industries"
            case kepEmailId = "kepEmailId"
            case secondaryTaxId = "secondaryTaxId"
            case taxOffice = "taxOffice"
        }
    }

    public struct UkraineAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The tax registration type.
        public let ukraineTrnType: UkraineTrnType

        @inlinable
        public init(ukraineTrnType: UkraineTrnType) {
            self.ukraineTrnType = ukraineTrnType
        }

        private enum CodingKeys: String, CodingKey {
            case ukraineTrnType = "ukraineTrnType"
        }
    }

    public struct UzbekistanAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        ///  The tax registration number type. The tax registration number type valid values are Business and Individual.
        public let taxRegistrationNumberType: UzbekistanTaxRegistrationNumberType?
        ///  The unique 12-digit number issued to identify VAT-registered identities in Uzbekistan.
        public let vatRegistrationNumber: String?

        @inlinable
        public init(taxRegistrationNumberType: UzbekistanTaxRegistrationNumberType? = nil, vatRegistrationNumber: String? = nil) {
            self.taxRegistrationNumberType = taxRegistrationNumberType
            self.vatRegistrationNumber = vatRegistrationNumber
        }

        public func validate(name: String) throws {
            try self.validate(self.vatRegistrationNumber, name: "vatRegistrationNumber", parent: name, pattern: "^[0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case taxRegistrationNumberType = "taxRegistrationNumberType"
            case vatRegistrationNumber = "vatRegistrationNumber"
        }
    }

    public struct ValidationException: AWSErrorShape {
        /// 400
        public let errorCode: ValidationExceptionErrorCode
        /// 400
        public let fieldList: [ValidationExceptionField]?
        public let message: String

        @inlinable
        public init(errorCode: ValidationExceptionErrorCode, fieldList: [ValidationExceptionField]? = nil, message: String) {
            self.errorCode = errorCode
            self.fieldList = fieldList
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "errorCode"
            case fieldList = "fieldList"
            case message = "message"
        }
    }

    public struct ValidationExceptionField: AWSDecodableShape {
        /// The name of the parameter that caused a ValidationException error.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
        }
    }

    public struct VerificationDetails: AWSEncodableShape {
        /// Date of birth to verify your submitted TRN. Use the YYYY-MM-DD format.
        public let dateOfBirth: String?
        /// The tax registration document, which is required for specific countries such as Bangladesh, Kenya, South Korea and Spain.
        public let taxRegistrationDocuments: [TaxRegistrationDocument]?

        @inlinable
        public init(dateOfBirth: String? = nil, taxRegistrationDocuments: [TaxRegistrationDocument]? = nil) {
            self.dateOfBirth = dateOfBirth
            self.taxRegistrationDocuments = taxRegistrationDocuments
        }

        public func validate(name: String) throws {
            try self.validate(self.dateOfBirth, name: "dateOfBirth", parent: name, max: 10)
            try self.validate(self.dateOfBirth, name: "dateOfBirth", parent: name, min: 10)
            try self.validate(self.dateOfBirth, name: "dateOfBirth", parent: name, pattern: "^(\\d{4}-(0[0-9]|1[0-2])-([0-2][0-9]|3[0-1]))$")
            try self.taxRegistrationDocuments?.forEach {
                try $0.validate(name: "\(name).taxRegistrationDocuments[]")
            }
            try self.validate(self.taxRegistrationDocuments, name: "taxRegistrationDocuments", parent: name, max: 5)
            try self.validate(self.taxRegistrationDocuments, name: "taxRegistrationDocuments", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dateOfBirth = "dateOfBirth"
            case taxRegistrationDocuments = "taxRegistrationDocuments"
        }
    }

    public struct VietnamAdditionalInfo: AWSEncodableShape & AWSDecodableShape {
        /// The electronic transaction code number on the tax return document. This field must be provided for successful API operation.
        public let electronicTransactionCodeNumber: String?
        /// The enterprise identification number for tax registration. This field must be provided for successful API operation.
        public let enterpriseIdentificationNumber: String?
        /// The payment voucher number on the tax return payment document. This field must be provided for successful API operation.
        public let paymentVoucherNumber: String?
        /// The date on the tax return payment document. This field must be provided for successful API operation.
        public let paymentVoucherNumberDate: String?

        @inlinable
        public init(electronicTransactionCodeNumber: String? = nil, enterpriseIdentificationNumber: String? = nil, paymentVoucherNumber: String? = nil, paymentVoucherNumberDate: String? = nil) {
            self.electronicTransactionCodeNumber = electronicTransactionCodeNumber
            self.enterpriseIdentificationNumber = enterpriseIdentificationNumber
            self.paymentVoucherNumber = paymentVoucherNumber
            self.paymentVoucherNumberDate = paymentVoucherNumberDate
        }

        public func validate(name: String) throws {
            try self.validate(self.electronicTransactionCodeNumber, name: "electronicTransactionCodeNumber", parent: name, pattern: "^\\d{17}$")
            try self.validate(self.enterpriseIdentificationNumber, name: "enterpriseIdentificationNumber", parent: name, pattern: "^(\\d{10}|(\\d{10}-\\d{3}))$")
            try self.validate(self.paymentVoucherNumber, name: "paymentVoucherNumber", parent: name, pattern: "^(\\d{17}|[A-Za-z]{3}\\d{13})$")
            try self.validate(self.paymentVoucherNumberDate, name: "paymentVoucherNumberDate", parent: name, pattern: "^(\\d{4}-(0[0-9]|1[0-2])-([0-2][0-9]|3[0-1]))$")
        }

        private enum CodingKeys: String, CodingKey {
            case electronicTransactionCodeNumber = "electronicTransactionCodeNumber"
            case enterpriseIdentificationNumber = "enterpriseIdentificationNumber"
            case paymentVoucherNumber = "paymentVoucherNumber"
            case paymentVoucherNumberDate = "paymentVoucherNumberDate"
        }
    }
}

// MARK: - Errors

/// Error enum for TaxSettings
public struct TaxSettingsErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case attachmentUploadException = "AttachmentUploadException"
        case caseCreationLimitExceededException = "CaseCreationLimitExceededException"
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize TaxSettings
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The access is denied for the Amazon Web ServicesSupport API.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// Failed to upload the tax exemption document to Amazon Web ServicesSupport case.
    public static var attachmentUploadException: Self { .init(.attachmentUploadException) }
    /// You've exceeded the Amazon Web ServicesSupport case creation limit for your account.
    public static var caseCreationLimitExceededException: Self { .init(.caseCreationLimitExceededException) }
    /// The exception when the input is creating conflict with the given state.
    public static var conflictException: Self { .init(.conflictException) }
    /// The exception thrown when an unexpected error occurs when processing a request.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The exception thrown when the input doesn't have a resource associated to it.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The exception when the input doesn't pass validation for at least one of the input parameters.
    public static var validationException: Self { .init(.validationException) }
}

extension TaxSettingsErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "ConflictException": TaxSettings.ConflictException.self,
        "InternalServerException": TaxSettings.InternalServerException.self,
        "ResourceNotFoundException": TaxSettings.ResourceNotFoundException.self,
        "ValidationException": TaxSettings.ValidationException.self
    ]
}

extension TaxSettingsErrorType: Equatable {
    public static func == (lhs: TaxSettingsErrorType, rhs: TaxSettingsErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension TaxSettingsErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
